package com.example.project.service.serviceimpl;

import com.example.project.mapper.StudentMapper;
import com.example.project.pojo.Student;
import com.example.project.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StudentServiceImpl implements StudentService {
    //依赖注入
    @Autowired
    StudentMapper studentMapper;

    @Override
    public List<Student> GetStudentAll(){
        return studentMapper.getStudent();
    }

    @Override
    public void addStudent(Student student){
        studentMapper.addStudent(student);
    }

    @Override
    public void updateEval(Student student){
        studentMapper.updateEval(student);
    }

    @Override
    public void deleteStudent(int id){
        studentMapper.deleteStudent(id);
    }
}
